<template>
    MyLeft组件
    <div>
        count值为：{{count}}
        <button @click="count++">count+1</button>
    </div>
</template>
<script setup>
import { ref,onMounted,onUnmounted,onActivated,onDeactivated} from 'vue';
const count = ref(0);
onMounted(()=>{
    console.log('MyLeft组件挂载');
})
onUnmounted(()=>{
    console.log('MyLeft组件卸载');
})
onActivated(()=>{
    console.log('MyLeft组件激活');
})
onDeactivated(()=>{
    console.log('MyLeft组件停用');
})
</script>